package cn.com.bluemoon.daps.model.mapper;

import cn.com.bluemoon.daps.model.entity.DapDataModelGroup;
import cn.com.bluemoon.daps.model.entity.DapDataModelTableForeignKey;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.Pattern;

@Repository
public interface DapDataModelTableForeignKeyMapper extends BaseMapper<DapDataModelTableForeignKey> {


    @Delete("delete from dap_data_model_table_foreign_key where model_table_id = #{tableId} or reference_table_id = #{tableId}")
    boolean delTableForeignTable(@Param("tableId")String tableId);
}
